﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mapping;

namespace NHibernate.Audit
{
    public static class PersistentClassExtensions
    {

        public static int ClassDepth(this PersistentClass clazz)
        {
            int depth = 0;
            PersistentClass pc = clazz;
            while (pc != null)
            {
                depth++;
                pc = pc.Superclass;
            }
            return depth;
        }


    }
}
